/**
 * Author: Nam Nguyen (khoanam.nguyen@vitagi.com or ngkhnam@gmail.com) 
 */

if(!vitagi){
	var vitagi = {};
}

vitagi.timer = function(){
	this.interval = 1000;
	this.timerId = null;
	this.isRuning = false;
};

vitagi.timer.prototype = {
	start: function(){
		this.isRuning = true;
		var that = this;
		this.timerId = setInterval(function(){
			that.onTick();
		},this.interval);
	},
	
	stop: function(){
		this.isRuning = false;
		clearInterval(this.timerId);
		this.timerId = null;
	},
	onTick: function(){
		
	}
};